home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / glibc-1.09 / glibc-1 / glibc-1.09.1 / sysdeps / unix / errnos.awk < prev    next >
Encoding:
AWK Script  |  1994-07-18  |  367 b   |  13 lines

  1. BEGIN { special = 0 }
  2.  
  3. /ERRNOS/ { nerrnos = split(errnos, errs)
  4.          for (i = 1; i <= nerrnos; ++i)
  5.            # Some systems define errno codes inside undefined #ifdefs,
  6.            # and then never actually use them.
  7.            printf "#ifdef %s\n  DO(\"%s\", %s);\n#endif\n", \
  8.          errs[i], errs[i], errs[i]
  9.          special = 1 }
  10.  
  11.  
  12. { if (special == 0) print $0; special = 0 }
  13.